package cl.mybatis.dao.test;

import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import cl.mybatis.dao.TeacherMapper;
import cl.mybatis.entity.Teacher;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "/spring-mybatis.xml")
public class TeacherDao {

	@Resource
	private TeacherMapper teacherDao;

	@Test
	public void testAdd() {
		Teacher t1 = new Teacher();
		for (int i = 1; i < 10001; i++) {
			t1.setId(i);
			t1.setAge(99);
			t1.setGender(1);
			teacherDao.insert(t1);
		}
	}
}
